#!/bin/sh
uci -q batch <<-EOF >/dev/null
	delete ucitrack.@dnsfilter[-1]
	add ucitrack dnsfilter
	set ucitrack.@dnsfilter[-1].init=dnsfilter
	commit ucitrack
	delete firewall.dnsfilter
	set firewall.dnsfilter=include
	set firewall.dnsfilter.type=script
	set firewall.dnsfilter.path=/var/etc/dnsfilter.include
	set firewall.dnsfilter.reload=1
	commit firewall
EOF
chmod 755 /etc/init.d/dnsfilter /usr/share/dnsfilter/* >/dev/null 2>&1
rm -rf /tmp/luci-modulecache /tmp/luci-indexcache*
exit 0
